package com.carbon;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.netflix.zuul.filters.route.ZuulFallbackProvider;
import org.springframework.context.annotation.Bean;

/**
 * @author yeshusheng
 * @version 1.0.0
 * @date 2021/6/15 14:20
 * @description
 */
@EnableZuulProxy
@SpringBootApplication
public class ApiGatewayApplication {
    public static void main(String[] args) {
        SpringApplication.run(ApiGatewayApplication.class, args);
    }

    @Bean
    public ZuulFallbackProvider routeAPIZuulFallbackProvider() {
        GenericZuulFallbackProvider routeZuulFallback = new GenericZuulFallbackProvider();
        return routeZuulFallback;
    }
}
